using System;
using System.Collections;

namespace PMG.model
{
    #region USER

    /// <summary>
	/// User object for NHibernate mapped table 'tbUser'.
	/// </summary>
	[Serializable]
	public class USER
	{
		#region Member Variables
		
		protected int _id;
		protected string _userName;
		protected string _userPwd;
		protected string _userRole;
		protected string _userMail;
		protected string _userState;

		#endregion

		#region Constructors

		public USER() { }

        public USER(string userName, string userPwd, string userRole, string userMail, string userState)
		{
			this._userName = userName;
			this._userPwd = userPwd;
			this._userRole = userRole;
			this._userMail = userMail;
			this._userState = userState;
		}

		#endregion

		#region Public Properties

		public int Id
		{
			get {return _id;}
			set {_id = value;}
		}

		public string UserName
		{
			get { return _userName; }
			set
			{
				if ( value != null && value.Length > 100)
					throw new ArgumentOutOfRangeException("Invalid value for UserName", value, value.ToString());
				_userName = value;
			}
		}

		public string UserPwd
		{
			get { return _userPwd; }
			set
			{
				if ( value != null && value.Length > 50)
					throw new ArgumentOutOfRangeException("Invalid value for UserPwd", value, value.ToString());
				_userPwd = value;
			}
		}

		public string UserRole
		{
			get { return _userRole; }
			set
			{
				if ( value != null && value.Length > 10)
					throw new ArgumentOutOfRangeException("Invalid value for UserRole", value, value.ToString());
				_userRole = value;
			}
		}

		public string UserMail
		{
			get { return _userMail; }
			set
			{
				if ( value != null && value.Length > 200)
					throw new ArgumentOutOfRangeException("Invalid value for UserMail", value, value.ToString());
				_userMail = value;
			}
		}

		public string UserState
		{
			get { return _userState; }
			set
			{
				if ( value != null && value.Length > 10)
					throw new ArgumentOutOfRangeException("Invalid value for UserState", value, value.ToString());
				_userState = value;
			}
		}

		

		#endregion
	}
	#endregion
}